home *** CD-ROM | disk | FTP | other *** search
/ Die Speccy' 97 / Die Speccy' 97.iso / amiga_system / the_aminet / comm / fido / tdisp11.lha / TrapDispatcher / Rexx / IntuiNode.rexx < prev    next >
OS/2 REXX Batch file  |  1994-11-15  |  2KB  |  90 lines

  1. /*
  2.  
  3.    IntuiNode.rexx 3.0
  4.  
  5.    This is actually the third version of the same program. The first version
  6.    was made in C and I used in in the (good?) old 1.3 days in PointManager.
  7.    Then Spot came and I rewrote it in ARexx and used Spot's ARexx commands
  8.    for requesters. This time it is made for TrapDispatcher and uses the
  9.    very good rexxreqtools.library.
  10.  
  11.    You can of course also use this script with any other program if you
  12.    want to...
  13.  
  14.    Thanks to Nico Franτois for reqtools.library and to Rafael D'Halleweyn
  15.    for the rexxreqtools.library.
  16.  
  17. */
  18.  
  19. /* Change these to suit your system */
  20.  
  21. pubscreen = "TRAPDOOR"
  22. nodelistdir = "NODELIST:"
  23.  
  24. /* Real script starts here */
  25.  
  26. IF ~SHOW(Libraries,'traplist.library') THEN
  27.     IF ~ADDLIB("traplist.library",0,-30,0) THEN EXIT
  28.  
  29. IF ~SHOW(Libraries,'rexxreqtools.library') THEN
  30.     IF ~ADDLIB("rexxreqtools.library",0,-30,0) THEN EXIT
  31.  
  32. cr='0a'x
  33.  
  34. options results
  35.  
  36. node=""
  37. call asknode
  38. res=FindNode(node,"All",nodelistdir)
  39.  
  40. do forever
  41.  parse var res error" "nod","sysop","name","phone","city","password","baud","cost","region","hub","flags
  42.  parse var node zone":"net"/"nod"."point
  43.  
  44.  if point="" then point="0"
  45.  
  46.  if left(res,1)=="0" then do
  47.   string="Node "node" not found"
  48.   title="IntuiNode.rexx Error"
  49.  end
  50.  else do
  51.   string=" Name: " || left(name,40) || cr || "Sysop: " || left(sysop,22) || "City: " || city || cr || "Phone: " || left(phone,22) || "Baud: " || baud || cr || "Flags: " || flags
  52.   title="Node "node
  53.  end
  54.  
  55.  if point==0 then do
  56.   gads="_New node|_Quit"
  57.  end
  58.  else do
  59.   gads="_New node|_Boss|_Quit"
  60.  end
  61.  
  62.  resp=rtezrequest(string,gads,title,"rt_pubscrname=" || pubscreen)
  63.  
  64.  if resp=0 then do
  65.   exit
  66.  end
  67.  
  68.  else if resp=1 then do
  69.   call asknode
  70.   res = FindNode(node,"All",nodelistdir)
  71.  end
  72.  
  73.  else if resp=2 then do
  74.   point=0
  75.   node=zone":"net"/"nod"."point
  76.   res=FindNode(node,"All",nodelistdir)
  77.  end
  78. end
  79.  
  80. asknode:
  81.  node=rtgetstring(node,,"Enter a node number",,"rt_pubscrname=" || pubscreen)
  82.  
  83.  if node=="" | rc==5 then do
  84.   exit
  85.  end
  86.  
  87.  return
  88.  
  89.  
  90.